package br.com.trabalho.controller;

import br.com.trabalho.entidades.Ingrediente;
import br.com.trabalho.entidades.Receita;
import br.com.trabalho.entidades.Usuario;
import br.com.trabalho.util.Util;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

@WebServlet("/inicio")
public class Inicio extends HttpServlet {

    private static final long serialVersionUID = 6551324257096839332L;

    public Inicio() {
        super();
    }

    protected void processa(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
        HttpSession session = request.getSession();
        
        RequestDispatcher disp = request.getRequestDispatcher("index");
        disp.forward(request, response);        
    }    

    @Override
    protected void doGet(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
        processa(request, response);
    }

    @Override
    protected void doPost(HttpServletRequest request,
            HttpServletResponse response) throws ServletException, IOException {
        processa(request, response);
    }
}
